home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / mac / After Effects 3.1 SDK Mac / Examples / Header Files / AE_EffectCB.h < prev    next >
Text File  |  1996-06-21  |  36KB  |  1,003 lines

  1. /** AE_EffectCB.h
  2.  
  3.     Adobe After Effects¬ Callback Header File
  4.  
  5.     Part of the Adobe After Effects 3.1 SDK.
  6.     Copyright (c) 1992-96 Adobe Systems Inc.
  7.     All Rights Reserved.
  8.  
  9.     NOTES
  10.         This file describes utility functions and macros for accessing
  11.         those utilities that are provided to every filter.  These functions
  12.         provide graphical tools, mathematical utilities, and other basic
  13.         library functions.
  14.  
  15.         An effect will want to use these callbacks for three primary reasons:
  16.  
  17.         1)    The mathematical and graphics callbacks will be efficiently
  18.             implemented, and will adaptively take advantage of any hardware
  19.             acceleration transparent to the effects module.
  20.         2)    The callbacks will maximize portability of the effect code
  21.             and consistency of results from platform to platform and from
  22.             effect to effect.
  23.         3)    The callbacks will simplify construction of complex filters,
  24.             both making filters easier to write and resulting in smaller
  25.             code for each filter.
  26.  
  27.         The After Effects standard for routine parameters is to list input
  28.         parameters first, then list parameters whose contents will be modified,
  29.         and then pass output parameters whose old value will be completely
  30.         replaced. Large or significant params tend to be listed earlier within
  31.         their segment.  Most callbacks we provide follow this standard, so with a
  32.         convolution callback, we generally would order parameters:
  33.             convolve(src_world, convolution_details, dst_world)
  34.         However, not all Mac routines follow this, so to be easily
  35.         brain-compatible with Mac programmers, we structure some routines
  36.         (actually just CopyBits) that we provide to be as much like the
  37.         corresponding Mac routine as possible.
  38.         
  39.         
  40.     5/29/96    ba    Fixed Transform_World bug by removing extraneous parameter (*src_rect)
  41.     6/12/96    ba    Updated for After Effects 3.1.
  42.  
  43. **/
  44.  
  45. #ifndef _H_AE_EffectCB
  46. #define _H_AE_EffectCB
  47.  
  48.  
  49. #include "AE_Effect.h"
  50.  
  51.  
  52. #if PRAGMA_ALIGN_SUPPORTED
  53. #pragma options align=mac68k
  54. #endif
  55.  
  56.  
  57. EXTERN_C_START
  58.  
  59.  
  60. /** ---------- Useful Constants ---------- **/
  61.  
  62. #define    PF_PI                3.14159265358979323846
  63. #define PF_2PI                6.28318530717958647692
  64. #define PF_HALF_PI            1.57079632679489661923
  65. #define PF_E                2.7182818284590452354
  66. #define PF_SQRT2            1.41421356237309504880
  67. #define PF_RAD_PER_DEGREE    0.01745329251994329576
  68.  
  69.  
  70.  
  71. /** ---------- PF_KernelFlags ----------
  72.  
  73.     Many functions work with "kernels" or matrices of values.  These matrices
  74.     can be of different types, of different arrangements, and can be generated
  75.     or treated in different ways.  The KernelFlags are used in a variety of
  76.     functions to determine how the matrices should be created and used.  You
  77.     should OR together any flags you need.  Which flags are relevant for a
  78.     given routine are documented along with the prototype for the routine below.
  79.  
  80.     The most important information to consider is the type of data.
  81.     You will have to choose whether to use Fixeds, Chars, or Longs.
  82.     See the information on the USE_... flags below.
  83.  
  84.     Note, the default for each flag is listed first and passing zero for
  85.     the flags parameter will automatically get you the defaults.
  86.  
  87.     Some of the non-default parameters may not be implemented.  Where
  88.     a flag is not implemented it will be commented with "$$$" beside it.
  89.  
  90. **/
  91.  
  92. /* pass bottom flag for 1 dimensional kernel, or top for 2D kernel */
  93. #define    PF_KernelFlag_2D                0
  94. #define    PF_KernelFlag_1D                (1L << 0)
  95.  
  96. /* pass bottom flag to equalize kernel, forcing the volume under the
  97.  * kernel surface to be the same as the volume under the covered area
  98.  * of pixels.  Otherwise, it will be unnormalized.
  99.  */
  100. #define    PF_KernelFlag_UNNORMALIZED        0
  101. #define    PF_KernelFlag_NORMALIZED        (1L << 1)
  102.  
  103. /* use the first flag to force values to be clamped into their valid
  104.  * range (that is determined by the type of item (char, fixed, long).
  105.  */
  106. #define    PF_KernelFlag_CLAMP                0
  107. #define PF_KernelFlag_NO_CLAMP            (1L << 2)
  108.  
  109. /* pass the first flag to treat kernel as an array of longs valued from 0 to 255.
  110.  * pass the second to treat kernel as an array of unsigned chars from 0 to 255,
  111.  * pass the third to treat kernel as an array of Fixeds from 0 to 1.
  112.  * $$$ NOTE!  For now, only USE_LONG is implemented! $$$
  113.  */
  114. #define    PF_KernelFlag_USE_LONG            0
  115. #define    PF_KernelFlag_USE_CHAR            (1L << 3)
  116. #define PF_KernelFlag_USE_FIXED            (1L << 4)
  117. #define PF_KernelFlag_USE_UNDEFINED        ((1L << 4) | (1L << 3))
  118.  
  119. /* pass the top flag to apply a 1D convolution horizontally,
  120.  * the second to apply it vertically.
  121.  */
  122. #define PF_KernelFlag_HORIZONTAL        0
  123. #define    PF_KernelFlag_VERTICAL            (1L << 5)
  124.  
  125. /* pass the second flag to replicate border pixels when sampling
  126.  * off the edge;  pass the first flag to treat pixels off the
  127.  * edge as alpha zero (black).  $$$ NOTE! The replicate borders
  128.  * flag is unimplemented and this will be ignored. $$$
  129.  */
  130. #define PF_KernelFlag_TRANSPARENT_BORDERS    0
  131. #define    PF_KernelFlag_REPLICATE_BORDERS        (1L << 6)
  132.  
  133. /* top flag indicates straight convolution, second tells the
  134.  * convolution code to alpha-weight the contributions of pixels
  135.  * to the resulting convolved output.  $$$ NOTE! The alpha weighted
  136.  * convolve is not implemented and this will be ignored. $$$
  137.  */
  138. #define PF_KernelFlag_STRAIGHT_CONVOLVE        0
  139. #define PF_KernelFlag_ALPHA_WEIGHT_CONVOLVE    (1L << 7)
  140.  
  141. typedef unsigned long PF_KernelFlags;
  142.  
  143.  
  144.  
  145. /** ---------- PF_SampleEdgeBehav ----------
  146.  
  147.     The sampling routines always deal with 32 bit images, and thus
  148.     need to compute properly alpha-weighted samples. An issue arises
  149.     when an attempt is made to sample outside of the image content area.
  150.     
  151.     Before PF_PLUG_IN_VERSION 2, After Effects always treated pixels
  152.     outside of the image content area as having alpha = 0, which is desirable
  153.     in many cases. Distortions and other effects may want different sampling
  154.     behaviors, however, hence the PF_SampleEdgeBehav.
  155.     
  156.     
  157. **/
  158.  
  159. enum {
  160.     PF_SampleEdgeBehav_ZERO = 0L,    /* Treat pixels outside image as alpha 0;
  161.                                        Default behavior in After Effects 1.x */
  162.                                          
  163.     PF_SampleEdgeBehav_REPEAT = 1L,    /* Samples are clamped to nearest edge */
  164.     PF_SampleEdgeBehav_WRAP = 2L    /* Image wraps around horizontally and vertically */
  165.  
  166. };
  167.  
  168. typedef    unsigned long PF_SampleEdgeBehav;
  169.  
  170.  
  171. enum {
  172.     PF_Xfer_NONE = -1,
  173.     PF_Xfer_COPY,
  174.     PF_Xfer_BEHIND,
  175.     PF_Xfer_IN_FRONT,
  176.     PF_Xfer_DISSOLVE,
  177.     PF_Xfer_ADD,
  178.     PF_Xfer_MULTIPLY,
  179.     PF_Xfer_SCREEN,
  180.     PF_Xfer_OVERLAY,
  181.     PF_Xfer_SOFT_LIGHT,
  182.     PF_Xfer_HARD_LIGHT,
  183.     PF_Xfer_DARKEN,
  184.     PF_Xfer_LIGHTEN,
  185.     PF_Xfer_DIFFERENCE,
  186.     PF_Xfer_HUE,
  187.     PF_Xfer_SATURATION,
  188.     PF_Xfer_COLOR,
  189.     PF_Xfer_LUMINOSITY,
  190.     PF_Xfer_MULTIPLY_ALPHA,                     // dest alpha *= src alpha
  191.     PF_Xfer_MULTIPLY_ALPHA_LUMA,                // dest alpha *= src luminance
  192.     PF_Xfer_MULTIPLY_NOT_ALPHA,                    // dest alpha *= ~(src alpha)
  193.     PF_Xfer_MULTIPLY_NOT_ALPHA_LUMA,            // dest alpha *= ~(src luminance)
  194.     PF_Xfer_ADDITIVE_PREMUL,
  195.     PF_Xfer_ALPHA_ADD
  196. };
  197. typedef long    PF_TransferMode;
  198. typedef PF_TransferMode PF_XferMode;    
  199.  
  200.  
  201. typedef struct {
  202.     PF_TransferMode     xfer;
  203.     long                rand_seed;  // for PF_Xfer_DISSOLVE_RANDOMIZED
  204.     unsigned char        opacity;    // 0 - 255    
  205.     Boolean             rgb_only;   // ignored for PF_Xfer_MULTIPLY_ALPHA modes
  206.     short                padding;    // align to 4-byte boundaries
  207. } PF_CompositeMode;
  208.  
  209.  
  210. #define PF_TransferMode_ZERO_ALPHA_NOP(TMODE) \
  211. ((TMODE) != PF_Xfer_MULTIPLY_ALPHA && (TMODE) != PF_Xfer_MULTIPLY_ALPHA_LUMA)
  212.  
  213.  
  214. enum {
  215.     PF_MaskFlag_NONE = 0,            // just use the alpha, thank you
  216.     PF_MaskFlag_INVERTED = 1L << 0,    // invert the result of the mask
  217.     PF_MaskFlag_LUMINANCE = 1L << 1    // use the luminance values
  218.     
  219. };
  220.  
  221.  
  222. typedef long PF_MaskFlags;
  223.  
  224.  
  225. typedef struct {
  226.  
  227.     PF_World        mask;
  228.     Point            offset;    
  229.     PF_MaskFlags    what_is_mask;
  230.  
  231. } PF_MaskWorld;
  232.  
  233.  
  234. /** ---------- PF_SampPB ----------
  235.  
  236.     There are calls to sample an a non-integral point in an image,
  237.     and to sample an area of an image.  This parameter block describes
  238.     some information needed for these image resampling routines.
  239.  
  240. **/
  241. typedef struct {
  242.     
  243.     /* parameters needed for single point or area sample */
  244.     
  245.     PF_Fixed                x_radius;        /* radii are used for area sample, 0 for point sample */
  246.     PF_Fixed                y_radius;
  247.     PF_Fixed                area;            /* must fit in a Fixed; must be correct */
  248.     PF_World                *src;            /* the world to sample from */
  249.     PF_SampleEdgeBehav        samp_behave;
  250.     long                    allow_asynch;    /* It's okay if I don't get the result until end_sampling */
  251.  
  252.     /* parameters needed for batch sampling & compositing, motion blur, etc. */
  253.  
  254.     long                    motion_blur;    /* requires pointer to 2 starting points and 2 dxdy's */
  255.     PF_CompositeMode        comp_mode;        /* compositing mode info */
  256.     PF_Pixel                    *mask0;         /* per-pixel extra masking, before xfer mode */
  257.     
  258.     unsigned char            *fcm_table;
  259.     unsigned char            *fcd_table;
  260.     long                     reserved[8];    /* $$$ reserved for acceleration plugins. Set to zero at beginsampling */    
  261.  
  262. } PF_SampPB;
  263.  
  264.  
  265. /** ---------- Callback Selectors ----------
  266.  
  267.     Some callbacks have different high and low quality versions.
  268.     The parameter block of function pointers will automatically
  269.     be filled with the appropriate versions for the current quality
  270.     setting, but some filters may wish to override this and access
  271.     a callback of different quality.  To do this, a get_callback_addr
  272.     callback is provided which will take a callback selector and a
  273.     desired quality and return the callback of that quality.  The
  274.     selectors for the various callbacks are listed here.  Also, a
  275.     typedef for the function pointer that will be returned is given.
  276.  
  277. **/
  278.  
  279. enum {
  280.     PF_Callback_NONE = 0,
  281.     PF_Callback_BEGIN_SAMPLING,
  282.     PF_Callback_SUBPIXEL_SAMPLE,
  283.     PF_Callback_AREA_SAMPLE,
  284.     PF_Callback_GET_BATCH_FUNC,
  285.     PF_Callback_END_SAMPLING,
  286.     PF_Callback_COMPOSITE_RECT,
  287.     PF_Callback_BLEND,
  288.     PF_Callback_CONVOLVE,
  289.     PF_Callback_COPY,
  290.     PF_Callback_FILL,
  291.     PF_Callback_GAUSSIAN,
  292.     PF_Callback_ITERATE,
  293.     PF_Callback_PREMUL,
  294.     PF_Callback_PREMUL_COLOR,
  295.     PF_Callback_RGB_TO_HLS,
  296.     PF_Callback_HLS_TO_RGB,
  297.     PF_Callback_RGB_TO_YIQ,
  298.     PF_Callback_YIQ_TO_RGB,
  299.     PF_Callback_LUMINANCE,
  300.     PF_Callback_HUE,
  301.     PF_Callback_LIGHTNESS,
  302.     PF_Callback_SATURATION,
  303.     PF_Callback_NEW_WORLD,
  304.     PF_Callback_GET_PLATFORM_REFS,
  305.     PF_Callback_DISPOSE_WORLD,
  306.     PF_Callback_ITERATE_ORIGIN,
  307.     PF_Callback_ITERATE_LUT,
  308.     PF_Callback_TRANSFER_RECT,
  309.     PF_Callback_TRANSFORM_WORLD
  310.  
  311.     
  312. };
  313. typedef long PF_CallbackID;
  314.  
  315. typedef PF_Err (*PF_CallbackFunc)(PF_ProgPtr, ...);
  316.  
  317.  
  318. /** ---------- Image Plane Selectors ----------
  319.  
  320.     These constants can be used to specify a subset
  321.     of the planes of the 32-bit image.
  322.  
  323. **/
  324.  
  325. enum {
  326.     PF_Plane_ALPHA = 1,
  327.     PF_Plane_RED = 2,
  328.     PF_Plane_GREEN = 4,
  329.     PF_Plane_BLUE = 8
  330. };
  331. typedef unsigned long PF_Plane;
  332.  
  333.  
  334. /** ---------- ANSI Routines Block ----------
  335.  
  336.     Within the callback routines block there is a block of ANSI
  337.     routines, so that the filter will not need to link with the
  338.     ANSI library.  The following structure describes that block
  339.     and is included in the larger Callback Routines block below.
  340.  
  341.     All angles are expressed in radians; use PF_RAD_PER_DEGREE
  342.     to convert from degrees to radians, if necessary.  Be aware
  343.     that angle parameter types use degrees (in fixed point).
  344.  
  345.     Sprintf and strcpy are provided to facilitate string usage,
  346.     such as printing for names and supervised controls.
  347.  
  348.     None of these callbacks vary based on the Quality setting.
  349.     
  350.     The functions in this block are described here, but are more 
  351.     easily accessed through the macros which follow at the bottom 
  352.     of this file.
  353.  
  354. **/
  355.  
  356. typedef struct {
  357.     double    (*atan)(double);
  358.     double    (*atan2)(double y, double x);    /* returns atan(y/x) - note param order! */
  359.     double    (*ceil)(double);                /* returns next int above x */
  360.     double    (*cos)(double);                    /* returns cosine of x */
  361.     double    (*exp)(double);                    /* returns e to the x power */
  362.     double    (*fabs)(double);                /* returns absolute value of x */
  363.     double    (*floor)(double);                /* returns closest int below x */
  364.     double    (*fmod)(double x, double y);    /* returns x mod y */
  365.     double    (*hypot)(double x, double y);    /* returns sqrt(x*x + y*y) */
  366.     double    (*log)(double);                    /* returns natural log of x */
  367.     double    (*log10)(double);                /* returns log base 10 of x */
  368.     double    (*pow)(double x, double y);        /* returns x to the y power */
  369.     double    (*sin)(double);                    /* returns of sine of x */
  370.     double    (*sqrt)(double);                /* returns the square root of x */
  371.     double    (*tan)(double);                    /* returns the tangent of x */
  372.  
  373.     int        (*sprintf)(char *, const char *, ...);    /* emulates clib sprintf routine */
  374.     char *    (*strcpy)(char *, const char *);        /* emulates clib strcpy routine */
  375.  
  376.     double (*asin)(double);                    /* returns the arc sine of x */
  377.     double (*acos)(double);                    /* returns the arc cosine of x */
  378.     
  379.     long    ansi_procs[1];
  380. } PF_ANSICallbacks;
  381.  
  382.  
  383.  
  384. /** ---------- Colorspace Conversion Callbacks ----------
  385.  
  386.     Within the callback routines block there is a block of colorspace
  387.     conversion routines.  The following structure describes that block
  388.     and is included in the larger Callback Routines block below.
  389.     
  390.     The functions in this block are described here, but are more 
  391.     easily accessed through the macros which follow at the bottom 
  392.     of this file.
  393.  
  394.  
  395.     RGBtoHLS
  396.         Given an rgb pixel, this returns a HLS (hue, lightness, saturation) pixel. HLS 
  397.         values and scaled from 0..1 in fixed point.
  398.  
  399.     HLStoRGB
  400.         Given an HLS pixel, this returns an RGB pixel.
  401.     
  402.     RGBtoYIQ
  403.         Given an rgb pixel, this returns a YIQ (luminance, inphase chrominance, quadrature 
  404.         chrominance) pixel.  Y is [0..1] in fixed point, I is [-0.5959 to 0.5959] in fixed 
  405.         point, and Q is [-0.5227 to 0.5227] in fixed point. Pretty useless, actually.
  406.     
  407.     YIQtoRGB
  408.         Given a YIQ pixel, this returns an rgb pixel.  Equally useless.
  409.  
  410.     Luminance
  411.         Given an rgb pixel, this returns 100 * its luminance value (0..25500).
  412.     
  413.     Hue
  414.         Given an rgb pixel, this returns its hue angle mapped from 0 to 255, where 0 is 0 
  415.         degrees and 255 is 360 degrees.
  416.         
  417.     Lightness
  418.         Given an rgb pixel, this returns its lightness value (0 to 255).
  419.         
  420.     Saturation
  421.         Given an rgb pixel, this returns its saturation value (0 to 255).
  422.  
  423.  **/
  424.  
  425. typedef struct {
  426.  
  427.     PF_Err (*RGBtoHLS)(
  428.         PF_ProgPtr        effect_ref,        // reference from in_data
  429.         PF_Pixel        *rgb,
  430.         PF_HLS_Pixel    hls);
  431.  
  432.     PF_Err (*HLStoRGB)(
  433.         PF_ProgPtr        effect_ref,        // reference from in_data
  434.         PF_HLS_Pixel    hls,
  435.         PF_Pixel        *rgb);
  436.  
  437.     PF_Err (*RGBtoYIQ)(
  438.         PF_ProgPtr        effect_ref,        // reference from in_data
  439.         PF_Pixel        *rgb,
  440.         PF_YIQ_Pixel    yiq);
  441.  
  442.     PF_Err (*YIQtoRGB)(
  443.         PF_ProgPtr        effect_ref,        // reference from in_data
  444.         PF_HLS_Pixel    yiq,
  445.         PF_Pixel        *rgb);
  446.         
  447.     PF_Err (*Luminance)(
  448.         PF_ProgPtr        effect_ref,        // reference from in_data
  449.         PF_Pixel        *rgb,
  450.         long            *lum100);        // << 100 * luminance
  451.  
  452.     PF_Err (*Hue)(
  453.         PF_ProgPtr        effect_ref,        // reference from in_data
  454.         PF_Pixel        *rgb,
  455.         long            *hue);            // << 0-255 maps to 0-36
  456.  
  457.     PF_Err (*Lightness)(
  458.         PF_ProgPtr        effect_ref,        // reference from in_data
  459.         PF_Pixel        *rgb,
  460.         long            *lightness);    // <<  goes from 0-255
  461.     
  462.     PF_Err (*Saturation)(
  463.         PF_ProgPtr        effect_ref,        // reference from in_data
  464.         PF_Pixel        *rgb,
  465.         long            *saturation);    // <<  goes from 0-255
  466.         
  467. } PF_ColorCallbacks;
  468.  
  469.  
  470. /** ---------- Batch Sampling Prototype ----------
  471.  **
  472.  **     See "get_batch_func" down below
  473.  **
  474.  **/
  475.         
  476. typedef    PF_Err (*PF_BatchSampleFunc)(
  477.         PF_ProgPtr        effect_ref,        /* >> */
  478.         long            num_samples,    /* >> */
  479.         PF_FixedPoint    *points,        /* >> points to sample. If (dxdy0), points[0] is starting sample point */
  480.         PF_FixedPoint    *dxdy0,            /* >> step vector in sampling space */
  481.         const PF_SampPB    *params,        /* >> */
  482.         PF_Pixel        *sequent_addr0);/* <> starting address for sequential fill */
  483.  
  484.  
  485.  
  486.  
  487. /** ---------- Callback Routines Block ----------
  488.  
  489.     This structure is pointed to by the utils pointer in the in_params
  490.     structure described in PF_Public.h.  The functions in this block are
  491.     described here, but are more easily accessed through the macros which
  492.     follow at the bottom of this file.
  493.  
  494.     The functions defined in this block are:
  495.  
  496.     begin_sampling
  497.         Call this routine before you plan to perform a large number of
  498.         image resamplings. Depending on platform, this routine could
  499.         start up the DSP chip, compute an index table to each scanline
  500.         of the buffer, or whatever might be needed to speed up image
  501.         resampling.
  502.         
  503.     subpixel_sample
  504.         Use this to interpolate the appropriate alpha weighted mix of
  505.         colors at a non-integral point in a source image, in high quality.
  506.         Nearest neighbor sample is used in low quality.
  507.  
  508.     area_sample
  509.         Use this to calculate the appropriate alpha weighted average
  510.         of an axis-aligned non-integral rectangle of color in a source
  511.         image, in high quality.  Nearest neighbor in low quality.
  512.         Because of overflow issues, this can only average a maximum of
  513.         a 256 pixel by 256 pixel area (ie. x and y range < 128 pixels).
  514.     
  515.     get_batch_func -- returns a pointer to the "batch_sample" function given
  516.         a sampling parameter block and a quality level. A batch
  517.         sample routine is used to perform a large number of image resamples at once.
  518.         This routine could do a number of things to improve sampling performance,
  519.         depending on platform. One obvious possible speedup is the elimination
  520.         of function calls for repeated samples. Another is pipelining the sample
  521.         requests into a DSP, and another is using context to avoid recalculation
  522.         of sample weights, etc.
  523.         
  524.     end_sampling
  525.         Call this routine when you're done sampling. It should undo
  526.         whatever begin_sampling did.
  527.  
  528.     blend
  529.         To blend two images with one another...  This is provided
  530.         because ALL effects should have a default state in which there
  531.         is no visual change to the source image.  This can often be
  532.         realized by providing a "blend-with-source" slider.  It is
  533.         possible that this will have different high and low qual versions.
  534.  
  535.     convolve
  536.         Convolve an image with an arbitrary size kernel on each of the
  537.         a, r, g, and b channels separately.  You can specify a rectangle to
  538.         convolve (for instance, the extent_hint), or pass NULL to convolve
  539.         the entire image.  This looks for kernel flags:
  540.             1D or 2D
  541.             Clamp or No Clamp
  542.             Use longs-chars-fixeds
  543.             straight convolve vs. alpha-weighted
  544.         plus, if 1D is specified:
  545.             Horizontal or Vertical
  546.         See the comments about the kernel flags above.
  547.         Note: some 2D convolutions are seperable and can be implemented
  548.         with a horizontal 1D convolve and a vertical 1D convolve.
  549.         This filter may have different high and low quality versions.
  550.  
  551.     copy
  552.         This blits a region from one PF_World to another.  This is an alpha-
  553.         preserving (unlike CopyBits), 32-bit only, non-antialiased stretch blit.
  554.         The high qual version does an anti-aliased blit (ie. it interpolates).
  555.  
  556.     fill
  557.         This fills a rectangle in the image with the given color.  Setting
  558.         the color pointer to NULL will fill the rectangle with black.
  559.         Quality setting doesn't matter.
  560.  
  561.     gaussian_kernel
  562.         Generate a kernel with a Gaussian distribution of values.
  563.         This looks for kernel flags:
  564.             1D or 2D
  565.             Normalized or Unnormalized
  566.             Use longs-chars-fixeds
  567.         This filter will be the same high and low quality.
  568.         Parameter Notes:
  569.             multiplier:  this value is multiplied by every value generated;
  570.                 in general, you should pass 1.0, but this lets you adjust
  571.                 the "fuzziness" of the kernel.
  572.             diameter:  actual integral width of generated kernel;  this will
  573.                 always currently be (int)ceil(kRadius) * 2 + 1;  you need to
  574.                 know this because the "kernel" array must be already allocated
  575.                 upon entry to this routine.
  576.             kernel:  kernel is a "diameter" by "diameter" array of values
  577.                 allocated by you, of longs, chars, or Fixeds.  It points to
  578.                 the kernel upper left corner.
  579.  
  580.     iterate
  581.         This invokes a function you specify on a region of pixels in the source
  582.         and dest images.  You give a refcon, and the function is invoked with
  583.         that refcon, plus the x and y coordinates of the current pixel, plus
  584.         pointer to that pixel in the src and dest images.  You can specify a
  585.         rectangle to iterate over (for instance, the extent_hint), or pass NULL
  586.         for the rect param to iterate over every pixel where the worlds overlap.
  587.         If you pass the src world as NULL, this will just iterate over the dst.
  588.         NOTE: This function takes the PF_InData pointer, not just the effect_ref.
  589.         This function will automatically make the progress bar go as it iterates.
  590.         To allow your effect to have the progress bar go across just once and
  591.         still perform multiple iterations, "iterate" starts progress at a base
  592.         number you specify, and goes to that number + the height of the image,
  593.         reporting the progress out of a possible maximum that you also specify.
  594.         Pass the max number as zero to turn off progress reporting.
  595.         This is quality independent.
  596.         
  597.     iterate_origin
  598.         This routine is similar to iterate except that it lets you specify an 
  599.         offset from the input into the output.
  600.  
  601.     interate_lut
  602.         This is an iterate with a Look Up Table. This is the same as iterate except 
  603.         it uses a look up table instead of a function pointer. The look up table values 
  604.         for alpha, red, green, blue are specified using the *_lut0 parameters. If any of 
  605.         these are 0, then the identity look up table will be used.
  606.     
  607.     transfer_rect
  608.         This performs a rect to rect blend using any of the supported After Effects 
  609.         transfer modes with an optional mask.
  610.  
  611.     transform_world
  612.         This callback signifies the heart of the After Effects rendering engine. Given 
  613.         src_world and a matrix, or an array of matrices, this transforms and blends 
  614.         using any of the supported After Effects transfer modes, with an optional mask. 
  615.         A matricies pointer points to a matrix array used for motion-blur.
  616.  
  617.     premultiply
  618.         To convert to and from having r, g, and b color values
  619.         premultiplied by the pixel alpha value.  High qual same as low qual.
  620.  
  621.     premultiply_color
  622.         To convert between premul and straight pixel buffers where the
  623.         color channels were matted with a color other than black.
  624.         
  625.     new_world
  626.         This creates a new PF_World for scratch for you.
  627.         You must dispose of it.  This is quality independent.
  628.  
  629.     get_platform_refs
  630.         This routine will return two platform-specific long words for a given
  631.         PF_World. In the case of the Macintosh, the first will be a CGrafPtr and
  632.         the second will be a GDeviceHandle.
  633.         
  634.     dispose_world
  635.         This disposes a PF_World, deallocating pixels, etc.
  636.         Only call it on worlds you have created.  Quality independent.
  637.  
  638.     get_callback_addr
  639.         Chances are, you will never use this callback.  This is the
  640.         callback to get addresses of callback functions at different
  641.         qualities. See the large comment in the Callback Selectors section.
  642.         You would use this to circumvent the NearestNeighbor behaviour
  643.         of the sampling functions at low quality, if you really needed to.
  644.         Here you can also override the alpha mode, if necessary.
  645.         
  646.         You set the quality here, so this is sort of quality independent.
  647.  
  648. **/
  649.  
  650. typedef struct {
  651.     PF_Err (*begin_sampling)(
  652.         PF_ProgPtr        effect_ref,        /* reference from in_data */
  653.         PF_Quality        qual,
  654.         PF_ModeFlags    mf,
  655.         PF_SampPB        *params);
  656.         
  657.     PF_Err (*subpixel_sample)(
  658.         PF_ProgPtr        effect_ref,        /* reference from in_data */
  659.         PF_Fixed        x,
  660.         PF_Fixed        y,
  661.         const PF_SampPB    *params,
  662.         PF_Pixel        *dst_pixel);
  663.  
  664.     PF_Err (*area_sample)(
  665.         PF_ProgPtr        effect_ref,        /* reference from in_data */
  666.         PF_Fixed        x,
  667.         PF_Fixed        y,
  668.         const PF_SampPB    *params,
  669.         PF_Pixel        *dst_pixel);
  670.         
  671.     PF_Err (*get_batch_func)(
  672.         PF_ProgPtr            effect_ref,        /* reference from in_data */
  673.         PF_Quality            quality,
  674.         PF_ModeFlags        mode_flags,
  675.         const PF_SampPB        *params,
  676.         PF_BatchSampleFunc    *batch);
  677.         
  678.     PF_Err (*end_sampling)(
  679.         PF_ProgPtr        effect_ref,        /* reference from in_data */
  680.         PF_Quality        qual,
  681.         PF_ModeFlags    mf,
  682.         PF_SampPB        *params);
  683.  
  684.     PF_Err (*composite_rect)(
  685.         PF_ProgPtr        effect_ref,        /* from in_data */
  686.         Rect            *src_rect,        /* rectangle in source image */
  687.         long            src_opacity,    /* opacity of src */
  688.         PF_World        *source_wld,    /* src PF world */
  689.         long            dest_x,            /* upper left-hand corner of src rect...*/
  690.         long            dest_y,            /* ... in composite image */
  691.         PF_Field        field_rdr,        /* which scanlines to render (all, upper, lower) */
  692.         PF_XferMode        xfer_mode,        /* Copy, Composite Behind, Composite In Front */
  693.         PF_World        *dest_wld);        /* Destination buffer. Already filled */
  694.  
  695.     PF_Err (*blend)(
  696.         PF_ProgPtr        effect_ref,        /* reference from in_data */
  697.         const PF_World    *src1,
  698.         const PF_World    *src2,
  699.         PF_Fixed        ratio,            /* 0 == full src1, 0x00010000 == full src2 */
  700.         PF_World        *dst);
  701.  
  702.     PF_Err (*convolve)(
  703.         PF_ProgPtr        effect_ref,        /* reference from in_data */
  704.         PF_World        *src,
  705.         const Rect        *area,            /* pass NULL for all pixels */
  706.         PF_KernelFlags    flags,
  707.         long            kernel_size,
  708.         void            *a_kernel,
  709.         void            *r_kernel,
  710.         void            *g_kernel,
  711.         void            *b_kernel,
  712.         PF_World        *dst);
  713.  
  714.     PF_Err (*copy)(
  715.         PF_ProgPtr        effect_ref,        /* reference from in_data    */
  716.         PF_World        *src,
  717.         PF_World        *dst,
  718.         Rect             *src_r,            /* pass NULL for whole world */
  719.         Rect            *dst_r);        /* pass NULL for whole world */
  720.  
  721.     PF_Err (*fill)(
  722.         PF_ProgPtr        effect_ref,        /* reference from in_data    */
  723.         const PF_Pixel    *color,
  724.         const Rect        *dst_rect,        /* pass NULL for whole world */
  725.         PF_World        *world);
  726.  
  727.     PF_Err (*gaussian_kernel)(
  728.         PF_ProgPtr        effect_ref,        /* reference from in_data */
  729.         double            kRadius,        /* desired gaussian radius */
  730.         PF_KernelFlags    flags,            /* see kernel flags commented above */
  731.         double            multiplier,
  732.         long            *diameter,
  733.         void            *kernel);
  734.  
  735.     PF_Err (*iterate)(
  736.         PF_InData        *in_data,
  737.         long            progress_base,
  738.         long            progress_final,
  739.         PF_World        *src,
  740.         const Rect        *area,            /* pass NULL for all pixels */
  741.         long            refcon,
  742.         PF_Err            (*pix_fn)(long refcon, long x, long y, PF_Pixel *in, PF_Pixel *out),
  743.         PF_World        *dst);
  744.  
  745.     PF_Err (*premultiply)(
  746.         PF_ProgPtr        effect_ref,        /* reference from in_data */
  747.         long            forward,        /* TRUE means convert non-premul to premul, FALSE mean reverse */
  748.         PF_World        *dst);
  749.         
  750.     PF_Err (*premultiply_color)(
  751.         PF_ProgPtr        effect_ref,        /* reference from in_data */
  752.         PF_World        *src,
  753.         PF_Pixel        *color,            /* color to premultiply/unmultiply with */
  754.         long            forward,        /* TRUE means convert non-premul to premul, FALSE mean reverse */
  755.         PF_World        *dst);
  756.  
  757.     PF_Err (*new_world)(
  758.         PF_ProgPtr        effect_ref,        /* reference from in_data */
  759.         long            width,
  760.         long            height,
  761.         long            blank,            /* should would be pre-cleared to zeroes */
  762.         PF_World        *world);        /* always 32 bit */
  763.  
  764.     PF_Err (*get_platform_refs)(
  765.         PF_ProgPtr        effect_ref,        /* reference from in_data */
  766.         PF_World        *world,            /* world to get info from */
  767.         void            **plat_1,        /* platform-specific long word, CGrafPtr on Mac */
  768.         void            **plat_2);        /* platform-specific long word, GDeviceHandle on Mac */
  769.  
  770.     PF_Err (*dispose_world)(
  771.         PF_ProgPtr        effect_ref,        /* reference from in_data */
  772.         PF_World        *world);
  773.  
  774.     PF_Err (*iterate_origin)(
  775.         PF_InData        *in_data,
  776.         long            progress_base,
  777.         long            progress_final,
  778.         PF_World        *src,
  779.         const Rect        *area,            /* pass NULL for all pixels */
  780.         const Point        *origin,
  781.         long            refcon,
  782.         PF_Err            (*pix_fn)(long refcon, long x, long y, PF_Pixel *in, PF_Pixel *out),
  783.         PF_World        *dst);
  784.  
  785.     PF_Err (*iterate_lut)(
  786.         PF_InData        *in_data,
  787.         long            progress_base,
  788.         long            progress_final,
  789.         PF_World        *src,
  790.         const Rect        *area,            /* pass NULL for all pixels */
  791.         unsigned char    *a_lut0,        /* pass NULL for identity */
  792.         unsigned char    *r_lut0,        /* pass NULL for identity */
  793.         unsigned char    *g_lut0,        /* pass NULL for identity */
  794.         unsigned char    *b_lut0,        /* pass NULL for identity */
  795.         PF_World        *dst);
  796.  
  797.     PF_Err    (*transfer_rect)(
  798.         PF_ProgPtr                effect_ref,
  799.         PF_Quality                quality,
  800.         PF_ModeFlags            m_flags,
  801.         PF_Field                field,
  802.         const Rect                *src_rec,
  803.         const PF_World            *src_world,
  804.         const PF_CompositeMode    *comp_mode,
  805.         const PF_MaskWorld        *mask_world0,
  806.         long                    dest_x,
  807.         long                    dest_y,
  808.         PF_World                *dst_world);
  809.  
  810.     PF_Err    (*transform_world)(
  811.         PF_ProgPtr                effect_ref,
  812.         PF_Quality                quality,
  813.         PF_ModeFlags            m_flags,
  814.         PF_Field                field,
  815.         const PF_World            *src_world,
  816.         const PF_CompositeMode    *comp_mode,
  817.         const PF_MaskWorld        *mask_world0,
  818.         const PF_FloatMatrix    *matrices,
  819.         long                    num_matrices,
  820.         Boolean                    src2dst_matrix,
  821.         const Rect                *dest_rect,
  822.         PF_World                *dst_world);
  823.         
  824.     long                procs[4];        /* expansion space */
  825.  
  826.     PF_Err (*get_callback_addr)(
  827.         PF_ProgPtr        effect_ref,        /* reference from in_data */
  828.         PF_Quality        quality,
  829.         PF_ModeFlags    mode_flags,
  830.         PF_CallbackID    which_callback,
  831.         PF_CallbackFunc    *fn_ptr);
  832.  
  833.     PF_Err (*app)(PF_ProgPtr, long, ...);    /* application specific callback */
  834.  
  835.     PF_ANSICallbacks    ansi;            /* ANSI callback block, see above */
  836.     PF_ColorCallbacks    colorCB;        /* colorspace conversion callbacks */
  837.     long                reserved[16];
  838.  
  839. } PF_UtilCallbacks;
  840.  
  841.  
  842. /** ---------- Callback Access Macros ----------
  843.  
  844.     Each of these macros _ASSUMES_ that the (PF_InData *) parameter to
  845.     the effects module was passed as a parameter named "in_data".  I know
  846.     this is a heinous assumption, but the template code all declares the
  847.     parameter like that, and by making that assumption, I can simplify
  848.     all these macros very much.  If you absolutely need to change the
  849.     name of that parameter, you will have to pick apart these macros and
  850.     invoke the callbacks by yourself.  It's not too hard...
  851.  
  852.     For efficiency, most notably with the image resampling functions (i.e.
  853.     subpixel_sample and area_sample), you may wish to declare a local function
  854.     pointer and bypass these macros to avoid the multiple dereferences in
  855.     your inner loop.  The sample code will show how to do this.
  856.  
  857.     The prototypes and comments about each function are given above in
  858.     the PF_UtilCallbacks structure definition.
  859.  
  860. **/
  861. #define PF_BEGIN_SAMPLING(QUALITY, PARAMS) \
  862.     (*((PF_UtilCallbacks *)in_data->utils)->begin_sampling)( \
  863.         in_data->effect_ref, (QUALITY), PF_MF_Alpha_STRAIGHT, (PARAMS))
  864.  
  865. #define PF_SUBPIXEL_SAMPLE(X, Y, PARAMS, DST_PXL) \
  866.     (*((PF_UtilCallbacks *)in_data->utils)->subpixel_sample)( \
  867.         in_data->effect_ref, (X), (Y), (PARAMS), (DST_PXL))
  868.  
  869. #define PF_AREA_SAMPLE(X, Y, PARAMS, DST_PXL) \
  870.     (*((PF_UtilCallbacks *)in_data->utils)->area_sample)( \
  871.         in_data->effect_ref, (X), (Y), (PARAMS), (DST_PXL))
  872.  
  873. #define PF_END_SAMPLING(QUALITY, PARAMS) \
  874.     (*((PF_UtilCallbacks *)in_data->utils)->end_sampling)( \
  875.         in_data->effect_ref, (QUALITY), PF_MF_Alpha_STRAIGHT, (PARAMS))
  876.  
  877. #define PF_BLEND(SRC1, SRC2, RATIO, DST) \
  878.     (*((PF_UtilCallbacks *)in_data->utils)->blend)( \
  879.         in_data->effect_ref, (SRC1), (SRC2), (RATIO), (DST))
  880.  
  881. #define PF_CONVOLVE(SRC, RCT_P, FLAGS, KRNL_SZ, AK, RK, GK, BK, DST) \
  882.     (*((PF_UtilCallbacks *)in_data->utils)->convolve)( \
  883.         in_data->effect_ref, (SRC), (RCT_P), (FLAGS), (KRNL_SZ), (AK), (RK), (GK), (BK), (DST))
  884.  
  885. #define PF_COPY(SRC, DST, SRC_RECT, DST_RECT) \
  886.     (*((PF_UtilCallbacks *)in_data->utils)->copy)( \
  887.         in_data->effect_ref, (SRC), (DST), (SRC_RECT), (DST_RECT))
  888.  
  889. #define PF_FILL(COLOR, DST_RECT, DST) \
  890.     (*((PF_UtilCallbacks *)in_data->utils)->fill)( \
  891.         in_data->effect_ref, (COLOR), (DST_RECT), (DST))
  892.  
  893. #define PF_GAUSSIAN_KERNEL(K_RAD, FLAGS, MULT, DIAM, KERNEL) \
  894.     (*((PF_UtilCallbacks *)in_data->utils)->gaussian_kernel)( \
  895.         in_data->effect_ref, (K_RAD), (FLAGS), (MULT), (DIAM), (KERNEL))
  896.  
  897. #define PF_ITERATE(PROG_BASE, PROG_FINAL, SRC, RCT_P, REFCON, PIX_FUNC, DST) \
  898.     (*((PF_UtilCallbacks *)in_data->utils)->iterate)( \
  899.         in_data, (PROG_BASE), (PROG_FINAL), (SRC), (RCT_P), (REFCON), (PIX_FUNC), (DST))
  900.  
  901. #define PF_PREMUL(FORWARD, DST) \
  902.     (*((PF_UtilCallbacks *)in_data->utils)->premultiply)( \
  903.         in_data->effect_ref, (FORWARD), (DST))
  904.  
  905. #define PF_PREMUL_COLOR(SRC, COLOR, FORWARD, DST) \
  906.     (*((PF_UtilCallbacks *)in_data->utils)->premultiply_color)( \
  907.         in_data->effect_ref, (SRC), (COLOR), (FORWARD), (DST))
  908.  
  909. #define PF_NEW_WORLD(WIDTH, HEIGHT, BLANK, WORLD) \
  910.     (*((PF_UtilCallbacks *)in_data->utils)->new_world)( \
  911.         in_data->effect_ref, (WIDTH), (HEIGHT), (BLANK), (WORLD))
  912.  
  913. #define PF_GET_PLATFORM_REFS(WORLD, PLAT1, PLAT2) \
  914.     (*((PF_UtilCallbacks *)in_data->utils)->get_platform_refs)( \
  915.         in_data->effect_ref, (WORLD), (PLAT1), (PLAT2))
  916.  
  917. #define PF_DISPOSE_WORLD(WORLD) \
  918.     (*((PF_UtilCallbacks *)in_data->utils)->dispose_world)( \
  919.         in_data->effect_ref, (WORLD))
  920.         
  921. #define PF_ITERATE_ORIGIN(PROG_BASE, PROG_FINAL, SRC, RCT_P, OR, REFCON, PIX_FUNC, DST) \
  922.     (*((PF_UtilCallbacks *)in_data->utils)->iterate_origin)( \
  923.         in_data, (PROG_BASE), (PROG_FINAL), (SRC), (RCT_P), (OR), (REFCON), (PIX_FUNC), (DST))
  924.  
  925. #define PF_ITERATE_LUT(PROG_BASE, PROG_FINAL, SRC, RCT_P, A_LUT, R_LUT, G_LUT, B_LUT, DST) \
  926.     (*((PF_UtilCallbacks *)in_data->utils)->iterate_lut)( \
  927.         in_data, (PROG_BASE), (PROG_FINAL), (SRC), (RCT_P), (A_LUT), \
  928.         (R_LUT), (G_LUT), (B_LUT), (DST))
  929.  
  930. #define PF_TRANSFER_RECT(QUALITY, M_FLAGS, FIELD, SRC_REC, SRC_WORLD, COMP_MODE, \
  931.                         MASK_WORLD_0, DST_X, DST_Y, DST) \
  932.     (*((PF_UtilCallbacks *)in_data->utils)->transfer_rect)( \
  933.         in_data->effect_ref, (QUALITY), (M_FLAGS), (FIELD), (SRC_REC), (SRC_WORLD), \
  934.         (COMP_MODE), (MASK_WORLD_0), (DST_X), (DST_Y), (DST))
  935.  
  936. #define PF_TRANSFORM_WORLD(QUALITY, M_FLAGS, FIELD, SRC_WORLD, COMP_MODE, \
  937.                         MASK_WORLD_0, MATRICES, NUM_MATRICES, SRC2DST_MATRIX, \
  938.                         DST_RECT, DST) \
  939.     (*((PF_UtilCallbacks *)in_data->utils)->transform_world)( \
  940.         in_data->effect_ref, (QUALITY), (M_FLAGS), (FIELD), (SRC_WORLD), \
  941.         (COMP_MODE), (MASK_WORLD_0), (MATRICES), (NUM_MATRICES), (SRC2DST_MATRIX), \
  942.         (DST_RECT), (DST))
  943.  
  944.  
  945. #define PF_ACOS(X)        (*((PF_UtilCallbacks *)in_data->utils)->ansi.acos)(X)
  946. #define PF_ASIN(X)        (*((PF_UtilCallbacks *)in_data->utils)->ansi.asin)(X)
  947. #define PF_ATAN(X)        (*((PF_UtilCallbacks *)in_data->utils)->ansi.atan)(X)
  948. #define PF_ATAN2(Y, X)    (*((PF_UtilCallbacks *)in_data->utils)->ansi.atan2)((Y), (X))
  949. #define PF_CEIL(X)        (*((PF_UtilCallbacks *)in_data->utils)->ansi.ceil)(X)
  950. #define PF_COS(X)        (*((PF_UtilCallbacks *)in_data->utils)->ansi.cos)(X)
  951. #define PF_EXP(X)        (*((PF_UtilCallbacks *)in_data->utils)->ansi.exp)(X)
  952. #define PF_FABS(X)        (*((PF_UtilCallbacks *)in_data->utils)->ansi.fabs)(X)
  953. #define PF_FLOOR(X)        (*((PF_UtilCallbacks *)in_data->utils)->ansi.floor)(X)
  954. #define PF_FMOD(X, Y)    (*((PF_UtilCallbacks *)in_data->utils)->ansi.fmod)((X), (Y))
  955. #define PF_HYPOT(X, Y)    (*((PF_UtilCallbacks *)in_data->utils)->ansi.hypot)((X), (Y))
  956. #define PF_LOG(X)        (*((PF_UtilCallbacks *)in_data->utils)->ansi.log)(X)
  957. #define PF_LOG10(X)        (*((PF_UtilCallbacks *)in_data->utils)->ansi.log10)(X)
  958. #define PF_POW(X, Y)    (*((PF_UtilCallbacks *)in_data->utils)->ansi.pow)((X), (Y))
  959. #define PF_SIN(X)        (*((PF_UtilCallbacks *)in_data->utils)->ansi.sin)(X)
  960. #define PF_SQRT(X)        (*((PF_UtilCallbacks *)in_data->utils)->ansi.sqrt)(X)
  961. #define PF_TAN(X)        (*((PF_UtilCallbacks *)in_data->utils)->ansi.tan)(X)
  962.  
  963. /* This is kind of a hack to deal with the varargs params to sprintf */
  964. #define PF_SPRINTF        (*((PF_UtilCallbacks *)in_data->utils)->ansi.sprintf)
  965.  
  966. #define    PF_STRCPY(DST, SRC) \
  967.     (*((PF_UtilCallbacks *)in_data->utils)->ansi.strcpy)((DST), (SRC))
  968.         
  969. #define PF_RGB_TO_HLS(RGB, HLS) \
  970.     (*((PF_UtilCallbacks *)in_data->utils)->colorCB.RGBtoHLS)((RGB), (HLS))
  971.     
  972. #define PF_HLS_TO_RGB(HLS, RGB) \
  973.     (*((PF_UtilCallbacks *)in_data->utils)->colorCB.HLStoRGB)((HLS), (RGB))
  974.     
  975. #define PF_RGB_TO_YIQ(RGB, YIQ) \
  976.     (*((PF_UtilCallbacks *)in_data->utils)->colorCB.RGBtoYIQ)((RGB), (YIQ))
  977.     
  978. #define PF_YIQ_TO_RGB(YIQ, RGB) \
  979.     (*((PF_UtilCallbacks *)in_data->utils)->colorCB.YIQtoRGB)((YIQ), (RGB))
  980.     
  981. #define PF_LUMINANCE(RGB, LUM100) \
  982.     (*((PF_UtilCallbacks *)in_data->utils)->colorCB.Luminance)((RGB), (LUM100))
  983.     
  984. #define PF_HUE(RGB, HUE) \
  985.     (*((PF_UtilCallbacks *)in_data->utils)->colorCB.Hue)((RGB), (HUE))
  986.  
  987. #define PF_LIGHTNESS(RGB, LIGHTNESS) \
  988.     (*((PF_UtilCallbacks *)in_data->utils)->colorCB.Lightness)((RGB), (LIGHTNESS))
  989.     
  990. #define PF_SATURATION(RGB, SATURATION) \
  991.     (*((PF_UtilCallbacks *)in_data->utils)->colorCB.Saturation)((RGB), (SATURATION))
  992.     
  993.  
  994. EXTERN_C_END
  995.  
  996.  
  997. #if PRAGMA_ALIGN_SUPPORTED
  998. #pragma options align=reset
  999. #endif
  1000.  
  1001.  
  1002. #endif /* _H_AE_EffectCB */
  1003.